package cn.itcast.log;

import cn.itcast.util.IdWorker;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@MapperScan(basePackages = "cn.itcast.log.mapper")
public class LogApplication {

    public static void main(String[] args) {
        SpringApplication.run(LogApplication.class,args);
    }

    // 使用Bean去管理IdWorker
    @Bean
    public  IdWorker idWorker(){
        return new IdWorker(0,0);
    }

}
